
public class SignSorter implements Comparable
{
	Sign s;
	int val;
	
	public SignSorter(Sign s)
	{
		this.s = s;
		val = s.getNormalFormVal();
	}
	
	public Sign getSign()
	{
		return s;
	}
	
	public int getVal()
	{
		return val;
	}
	
	public boolean equals(Object o)
	{
		if(this == o)
			return true;
		else if(this.getClass() != o.getClass())
			return false;
		else
		{
			SignSorter ss = (SignSorter) o;
			return (val == ss.getVal());
		}
	}

	public int compareTo(Object arg0) 
	{
		if(arg0.getClass() != this.getClass())
			return 0;
		SignSorter ss = (SignSorter) arg0;
		
		if(this.getVal() < ss.getVal())
			return -1;
		else if(this.getVal() > ss.getVal())
			return 1;
		else return 0;
	}
}
